<script setup lang="ts">
import { useRouter } from "vue-router";
import { startApp, destroyApp } from "wujie";
import { useTemplateRef, ref, onMounted } from "vue";
const router = useRouter();
const listenTwoRef = ref(null);

onMounted(() => {
  console.log('[listenTwo]1', listenTwoRef.value)
})

function gotoNext() {
  // router.push("/listen-two");
  console.log('[listenTwo]2', listenTwoRef.value)
}

function load() {
  startApp({ name: "ListenTwo", el: '.l-t-el', url: "http://localhost:1420/listen" });
}
function unload() {
  destroyApp('ListenTwo')
}

</script>
<template lang="pug">
  v-main
    v-col(cols="auto")
      v-btn(icon="mdi-arrow-right" @click="load") 加载
      v-btn(icon="mdi-arrow-right" @click="unload") 卸载
    v-col(cols="auto")
      | Homo
    v-col.l-t-el(ref="l-t-el" style="width: 100%; height: 100vh;")
</template>

<style>
</style>
